package domain.player;

import Domain.GameGrid;
import Domain.Player.Disc;
import Domain.Square;
import java.awt.Color;

/**
 * Abstract class representing a player in a game. It keeps track of the
 * attributes of a player, such as its name or the color of its discs, and is
 * responsible for getting the next move from the player.
 */
public abstract class Player {
	private String name;
	private Disc discID;
	private Color discColor;

	public Player(String name, Disc discID, Color discColor) {
		this.name = name;
		this.discID = discID;
		this.discColor = discColor;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setDiscID(Disc discID) {
		this.discID = discID;
	}

	public Disc getDiscID() {
		return discID;
	}
	
	public Color getDiscColor() {
		return discColor;
	}

	/** Returns the type of this playerinstance as a constant PlayerType. */
	public abstract PlayerType getType();

	/**
	 * Gets the player's next move.
	 * @return A column represented by an int
	 */
	public abstract Square getNextMove(GameGrid gamegrid);

	@Override
	public String toString() {
		return "player:"
				+ " name = " + this.name;
	}
}
